package cn.com.roy.thread.t3_1_12.pipeInputOutput;

import java.io.PipedInputStream;
import java.io.PipedOutputStream;

public class ThreadRead extends Thread{
    private PipedInputStream inputStream;
    private ReadData readData;

    public ThreadRead(ReadData readData , PipedInputStream inputStream){
        this.inputStream = inputStream;
        this.readData = readData;
    }

    @Override
    public void run() {
        super.run();
        readData.readMethod(inputStream);
    }
}
